/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-05-11
 * Time: 15:38
 */

//爆米花机
public class Popcorn {

    //饿汉式
    private static Popcorn instance = new Popcorn();

    public static Popcorn getInstance(){
        return instance;
    }

    //可以打开
    public void on(){
        System.out.println("popcorn on");
    }

    //关闭
    public void off(){
        System.out.println("popcorn off");
    }

    //出爆米花
    public void pop(){
        System.out.println("popcorn is poping");
    }

}
